﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ChoViet.Admin.ViewModels.UsefulEditViewmodel>" %>
<%@ Import Namespace="ChoViet.Lib.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Chi tiết hữu ích
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% if (ViewData["MessageInfo"] == null)
   {%>
   <table class="admintable">
    <tr>
        <td class="key">Ảnh đại diện</td>
        <td class="key">
                    <div>
				        <div class="div_img">
				            <a href="/Useful/Details/<%= Model.Useful.ID %>">
	                            <img class="represent" style="border:1px solid #ccc" alt="<%= Model.Useful.Title %>" src="<%= string.Format("{0}{1}", Model.ImageRootUrl,""+Model.Useful.ID+"_"+ Model.Useful.ImagePath) %>" />
	                        </a>
	                    </div>
				    </div>
        </td>
        
    </tr>
    <tr>
        <td class="key">Tiêu đề</td>
        <td><%=Html.Encode(Model.Useful.Title) %></td>
    </tr>
    <tr>
        <td class="key">Link url</td>
        <td><a href="<%= Model.Useful.LinkUrl%>" title="<%=Model.Useful.Title %>"><%= Model.Useful.LinkUrl%></a></td>
    </tr>
    <tr>
        <td class="key">Cập nhật ngày:</td>
        <td><%= string.Format("{0:dd/MM/yyyy}",Model.Useful.ModifiedDate != null ? Model.Useful.ModifiedDate : Model.Useful.AddDate) %></td>
    </tr>
    <tr>
        <td class="key">Độ ưu tiên</td>
        <td><%=Model.Useful.Priority %></td>
    </tr>
    <tr>
        <td class="key">Mô tả</td>
        <td><%=Model.Useful.Description %></td>
    </tr>
   </table> 
<%} %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
<td>
    <%= Html.Toolbar("Thêm mới","/Useful/Create", "new") %>
    <%= Html.Toolbar("Sửa", string.Format("/Useful/Edit/{0}", Model.Useful.ID), "edit")%>
    <%= Html.Toolbar("Xóa", string.Format("/Useful/Delete/{0}", Model.Useful.ID), "delete")%>
    <%= Html.Toolbar("Quay lại","/Useful", "back") %>
</td>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Chi tiết hữu ích
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
<%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
